package com.hrvsr.scheduler.distributed;



import com.hrvsr.common.Request;
import com.hrvsr.scheduler.DuplicateRemover;
import com.hrvsr.scheduler.distributed.redisbloomfilter.RedisBloomFilter;

public class RedisBloomDuplicateRemover implements DuplicateRemover {
	
	private RedisBloomFilter redisBloomFilter = null;
	
	@Override
	public boolean contains(Request request) {
		return redisBloomFilter.contains(request.toString());
	}

	@Override
	public void add(Request request) {
		redisBloomFilter.add(request.toString());
	}

	public RedisBloomDuplicateRemover(RedisBloomFilter redisBloomFilter) {
		super();
		this.redisBloomFilter = redisBloomFilter;
	}
	
	
}
